-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow for specifying a custom width for the profile popup #242
feat: allow for specifying a custom width for the profile popup #242
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Have you talked to Josh about this solution? If I understand correctly, he'll have to set this on every single customer site? |
Follow up question, can we set a sane default that can be overridden if necessary? |
@redreceipt I have not, I can reach out to him. He should only have to set this in places where the current pop-up doesn't fit, so it will depend on the specific use cases. Regarding a default to override, I think that's what we have in this PR. The existing behavior would be the default, and setting this new |
Got it! Ok we'll merge this and I'll make sure he knows to set this variable if he needs it. |
🐛 Issue
Closes #233
The profile popup width is based on the viewport width by default, and is absolutely positioned so its width isn't controlled by its container.
✏️ Solution
Implement a new data prop
data-search-profile-size
which takes a CSS width string, allowing the consumer to specify whatever width they need.Also nudge the popup to the right 15px to align it with the search bar.
🔬 To Test
I haven't been able to reproduce this locally, only was able to test by directly editing the source in the browser to apply the styling changes.
📸 Screenshots
With
data-search-profile-size
set to365px
: